// 全局共享数据示例
import { DEFAULT_NAME } from '@/constants';
import { getArticlePage } from '@/services/article';
import { getToken, getUerInfo } from '@/utils/info';
import { useRequest } from 'ahooks';
const useGobal = () => {
  const {data:unCheckNumber,run:refreshCheckNUmber}= useRequest(()=>{
    if(!!getToken()?.length){
      return getArticlePage({
        current:1,
        size:1,
        status:1,
        title:''
      })
    }
    return {
      totalCount:0,
    }
  },{
    pollingInterval: 10000,
  })
  return {
    unCheckNumber,
    refreshCheckNUmber
  };
};

export default useGobal;
